﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="QLUser.aspx.cs" Inherits="WebApplication1.Admin.QLUser" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<div style="width:790px; padding:0px 5px 0 5px;">
<div class="ct_top">
<div class="ct_left"></div>
<div class="ct_right"></div>
<div class="ct_center"><h1>quản lý user</h1></div>
</div> 
 <div class="ct_middle">
 
    <script src="../Scripts/javascript.js" type="text/javascript"></script> 
    <div style="padding:15px 0 15px 0;">
    <div><asp:Label ID="Lbthongbao" ForeColor="Red" runat="server" Text=""></asp:Label> </div>
     <asp:GridView ID="GvQLUser" runat="server" AutoGenerateColumns="False" Width="770px"
        CellPadding="6"
 DataKeyNames="Id,Phanquyen"        
 OnRowCancelingEdit="cancel" 
 OnRowDataBound="DataBound" 
 OnRowEditing="edit" 
 OnRowUpdating="update"
 OnRowCommand="RowCommand" 
 OnRowDeleting="delete"
 
  BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" 
            AllowPaging="True" PageSize="15" 
            onpageindexchanging="GvQLUser_PageIndexChanging">
        <RowStyle ForeColor="#000066" />
        <Columns>
            <asp:TemplateField HeaderText="Tên đăng nhập">
                <ItemTemplate>
                    <asp:Label ID="LbID" runat="server" Text='<%# Bind("Id") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
<%--            <asp:TemplateField HeaderText="Mật khẩu">
                <EditItemTemplate>
                    <asp:TextBox Width="50px" ID="txtmatkhau" MaxLength="64" runat="server" Text='<%# Bind("Matkhau") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("Matkhau") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>--%>
            <asp:TemplateField HeaderText="Phân quyền">
                <EditItemTemplate>
                    <asp:TextBox Width="70px" ReadOnly="true" ID="txtphanquyen" runat="server" Text='<%# Bind("Phanquyen") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("Phanquyen") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Họ và tên">
                <EditItemTemplate>
                    <asp:TextBox Width="80px" ID="txthoten" MaxLength="100" runat="server" Text='<%# Bind("Hoten") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label3" runat="server" Text='<%# Bind("Hoten") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Email">
                <EditItemTemplate>
                    <asp:TextBox Width="100px" ID="txtemail" MaxLength="100" runat="server" Text='<%# Bind("Email") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label4" runat="server" Text='<%# Bind("Email") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Số điện thoại">
                <EditItemTemplate>
                    <asp:TextBox Width="80px" ID="txtsodienthoai" MaxLength="14" runat="server" Text='<%# Bind("Sodienthoai") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label5" runat="server" Text='<%# Bind("Sodienthoai") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="User xấu">
                <EditItemTemplate>
                    <asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# Bind("Userxau") %>' />
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# Bind("Userxau") %>' 
                        Enabled="false" />
                </ItemTemplate>
            </asp:TemplateField>
            
            <asp:TemplateField HeaderText="Tài khoản">
                <EditItemTemplate>
                    <asp:TextBox Width="60px" ID="txttienmat" MaxLength="10" runat="server" Text='<%# Bind("Tienmat") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label7" runat="server" Text='<%# Bind("Tienmat") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            
            
            <asp:CommandField DeleteText="Xóa" EditText="Sửa" HeaderText="Sửa" 
                ShowEditButton="True" CancelText="Bỏ qua" UpdateText="Lưu" />
                
            <asp:TemplateField HeaderText="Xóa">
                  <ItemTemplate>
                     <asp:LinkButton ForeColor="#000066" ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Delete" CommandArgument=<%#Eval("Id") %>
                    OnClientClick="return DeleteConfirmation();"
                    Text="Xóa" />
                  </ItemTemplate>
            </asp:TemplateField>
            
        </Columns>
        <FooterStyle BackColor="White" ForeColor="#000066" />
        <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
        <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
    
    </asp:GridView>
    </div>
    </div>
<div class="ct_bottom">
<div class="ct_left"></div>
<div class="ct_right"></div>
<div class="ct_center"></div>
</div>
 </div>
 
</asp:Content>
